<?php
/****
* (临时用) 用户意见反馈模块
* 直接存到根目录的txt里了...
****/
class ContactAction extends InitAction{
    static $NOTICE_UID=1135;
    protected function _initialize(){
        parent::_initialize();
    }
    public function index(){
        if (is_null($_REQUEST['submit'])){
            $this->display('index');
        } else{
            //TODO 正规化记录
            $username= $_REQUEST['name'];
            $email= $_REQUEST['email'];
            $msg= $_REQUEST['msg'];
            
            $s='['.date(DATE_ATOM).']';
            $s= $s."\t $username < $email >\n$msg\n\n";
            error_log($s, 3, realpath('./').'/notice_contact.txt');
            
            $this->assign('waitSecond', 3); 
            $this->assign('jumpUrl', U('index/'));
            $this->success("您的意见已经成功发送，感谢您对Notice的支持！");
        }
    }
}
?>